<nav class="navbar navbar-static-top">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">切换导航</span>
      </a>
      <!-- Navbar Right Menu -->
      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <!-- Notifications: style can be found in dropdown.less -->
          <li class="dropdown notifications-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-bell-o"></i>
              <span class="label label-warning">#(size)</span>
            </a>
            <ul class="dropdown-menu">
              <li class="header">你有#(size)条消息未读</li>
              <li>
                <!-- inner menu: contains the actual data -->
                <ul class="menu">
                  #for(notice : notices)
                    <li>
	                    <a href="javascript:noticeDetail(#(notice.id));" >
	                      <i class="fa fa-weixin text-aqua"></i> #(notice.title)
	                    </a>
	                </li>
                  #end
                </ul>
              </li>
              <li class="footer"><a href="javascript:viewAll()">查看所有</a></li>
            </ul>
          </li>
          <li>
				<a data-toggle="dropdown" href="#" class="dropdown-toggle">
					<span>
						<small>操作选项</small>
					</span>
					<i class="fa fa-caret-down"></i>
				</a>
				<ul class="dropdown-menu">
					<li>
						<a href="javascript:openPerson();">
							<i class="light-grey fa fa-user" style="width:15px;"></i>
							<span style="color:#999C9E">个人信息编辑</span>
						</a>
					</li>
					<li>
						<a href="javascript:editPassword();">
							<i class="light-grey fa fa-lock" style="width:15px;"></i>
							<span style="color:#999C9E">个人密码修改</span>
						</a>
					</li>
					<li class="divider"></li>
					<li>
						<a href="javascript:showTab();">
							<i class="light-grey fa fa-location-arrow" style="width:15px;"></i>
							<span style="color:#999C9E">定位当前选项卡</span>
						</a>
					</li>
					<li>
						<a href="javascript:reloadTab();">
							<i class="light-grey fa fa-refresh" style="width:15px;"></i>
							<span style="color:#999C9E">刷新当前选项卡</span>
						</a>
					</li>
					<li class="divider"></li>
					<li>
						<a href="javascript:closeThis();">
							<i class="light-grey fa fa-times" style="width:15px;"></i>
							<span style="color:#999C9E">关闭当前选项卡</span>
						</a>
					</li>
					<li>
						<a href="javascript:closeOther();">
							<i class="light-grey fa fa-times-circle-o" style="width:15px;"></i>
							<span style="color:#999C9E">关闭其他选项卡</span>
						</a>
					</li>
					<li>
						<a href="javascript:closeAll();">
							<i class="light-grey fa fa-times-circle" style="width:15px;"></i>
							<span style="color:#999C9E">关闭全部选项卡</span>
						</a>
					</li>
					<li>
                            <a href="javascript:logout();">
                                <i class="light-grey fa fa-sign-out" style="width:15px;"></i>
                                <span style="color:#999C9E">退出登录</span>
                            </a>
                    </li>
				</ul>
			</li>
          <!-- Control Sidebar Toggle Button -->
          <li>
            <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
          </li>
        </ul>
      </div>
</nav>
 <script type="text/javascript">
	   var searchGrid = function(){};
	
	   var openPerson = function(){
			layer.open({
		   	    type: 2,
		   	    title:"#(loginAccount.name)→个人信息编辑",
		   	    area: ["800px", "400px"],
		   	    fix: false, //不固定
		   	    maxmin: true,
		   	    content: "/user/editMySelf/#(loginAccount.id)"
		   	});
		};
   
		var editPassword = function(){
			layer.open({
        	    type: 2,
        	    title:"#(loginAccount.name)→密码修改",
        	    area: ["250", "420px"],
        	    fix: false, //不固定
        	    maxmin: true,
        	    content: "/user/editPassword/#(loginAccount.id)"
        	});
		};
   
   		var logout = function(){
   			layer.confirm("是否确定退出？", {
                icon: 3,
                btn: ["确定", "取消"] //按钮
            }, function (index) {
            	layer.close(index);
                window.location.href="/logout";
            }, function () {
                //layer.msg('已取消');
            });
   		}
   		
   		var viewAll = function(){
	   		 window.top.addTabs({
	   	         id:"tab_noticeDetail",
	   	         title:"我的消息",
	   	         url: "/noticeDetail/index",
	   	         icon: 'fa fa-envelope',
	   	         close: true
	   	     });
   		}
   		
   		var noticeDetail = function(id){
	   		 window.top.addTabs({
	   	         id:id,
	   	         title:"我的消息→详情",
	   	         url: "/noticeDetail/view/"+id,
	   	         icon: '',
	   	         close: true
	   	     });
   		}
   </script>